<HTML>
<HEAD>
    <meta charset="UTF-8">
    <title>prepareTransition - transitionx</title>
    <link href="../../../style.css" rel="stylesheet">
</HEAD>
<BODY>
<a href="../../index.html">transitionx</a>&nbsp;/&nbsp;<a href="../index.html">in.arunkumarsampath.transitionx</a>&nbsp;/&nbsp;<a
        href="index.html">android.view.ViewGroup</a>&nbsp;/&nbsp;<a
        href="./prepare-transition.html">prepareTransition</a><br/>
<br/>
<h1>prepareTransition</h1>
<a name="in.arunkumarsampath.transitionx$prepareTransition(android.view.ViewGroup, kotlin.Boolean, kotlin.Function1((in.arunkumarsampath.transitionx.transition.set.DefaultTransitionSetBuilder, kotlin.Unit)))"></a>
<code><span class="keyword">inline</span> <span class="keyword">fun </span><a
        href="https://developer.android.com/reference/android/view/ViewGroup.html"><span
        class="identifier">ViewGroup</span></a><span class="symbol">.</span><span
        class="identifier">prepareTransition</span><span class="symbol">(</span><span
        class="identifier"
        id="in.arunkumarsampath.transitionx$prepareTransition(android.view.ViewGroup, kotlin.Boolean, kotlin.Function1((in.arunkumarsampath.transitionx.transition.set.DefaultTransitionSetBuilder, kotlin.Unit)))/cancel">cancel</span><span
        class="symbol">:</span>&nbsp;<a
        href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html"><span
        class="identifier">Boolean</span></a>&nbsp;<span class="symbol">=</span>&nbsp;false<span
        class="symbol">, </span><span class="identifier"
                                      id="in.arunkumarsampath.transitionx$prepareTransition(android.view.ViewGroup, kotlin.Boolean, kotlin.Function1((in.arunkumarsampath.transitionx.transition.set.DefaultTransitionSetBuilder, kotlin.Unit)))/transitionsBuilder">transitionsBuilder</span><span
        class="symbol">:</span>&nbsp;<a
        href="../../in.arunkumarsampath.transitionx.transition.set/-default-transition-set-builder/index.html"><span
        class="identifier">DefaultTransitionSetBuilder</span></a><span class="symbol">.</span><span
        class="symbol">(</span><span class="symbol">)</span>&nbsp;<span class="symbol">-&gt;</span>&nbsp;<a
        href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span
        class="identifier">Unit</span></a>&nbsp;<span class="symbol">=</span>&nbsp;{}<span
        class="symbol">)</span><span class="symbol">: </span><a
        href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span
        class="identifier">Unit</span></a></code>
<p>Schedules a call to <a
        href="https://developer.android.com/reference/android/support/transition/TransitionManager.html#beginDelayedTransition(android.view.ViewGroup)">TransitionManager.beginDelayedTransition</a>
    with receiver <a href="https://developer.android.com/reference/android/view/ViewGroup.html">ViewGroup</a>
    as
    the scene root. <a
            href="prepare-transition.html#in.arunkumarsampath.transitionx$prepareTransition(android.view.ViewGroup, kotlin.Boolean, kotlin.Function1((in.arunkumarsampath.transitionx.transition.set.DefaultTransitionSetBuilder, kotlin.Unit)))/transitionsBuilder">transitionsBuilder</a>
    uses a <a
            href="https://developer.android.com/reference/android/support/transition/TransitionSet.html">TransitionSet</a>
    instance internally and its
    properties can be modified by using available methods from <a
            href="../../in.arunkumarsampath.transitionx.transition.set/-default-transition-set-builder/index.html">DefaultTransitionSetBuilder</a>
</p>
<p>Usage:</p>
<pre><code>constraintLayout.prepareTransition {
    changeText {
        changeTextBehavior = ChangeText.CHANGE_BEHAVIOR_OUT_IN
    }
    +textView
}
textView.setText("Hello")
</code></pre>
<h3>Parameters</h3>
<p><a name="cancel"></a>
    <code>cancel</code> - if true, ends all previous transitions before starting this transition.
</p>
<p><a name="transitionsBuilder"></a>
    <code>transitionsBuilder</code> - Builder to construct transition instance for use with <a
            href="https://developer.android.com/reference/android/support/transition/TransitionManager.html">TransitionManager</a>
</p>
<a name="in.arunkumarsampath.transitionx$prepareTransition(android.view.ViewGroup, kotlin.Boolean, android.support.transition.Transition)"></a>
<code><span class="keyword">inline</span> <span class="keyword">fun </span><a
        href="https://developer.android.com/reference/android/view/ViewGroup.html"><span
        class="identifier">ViewGroup</span></a><span class="symbol">.</span><span
        class="identifier">prepareTransition</span><span class="symbol">(</span><span
        class="identifier"
        id="in.arunkumarsampath.transitionx$prepareTransition(android.view.ViewGroup, kotlin.Boolean, android.support.transition.Transition)/cancel">cancel</span><span
        class="symbol">:</span>&nbsp;<a
        href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html"><span
        class="identifier">Boolean</span></a>&nbsp;<span class="symbol">=</span>&nbsp;false<span
        class="symbol">, </span><span class="identifier"
                                      id="in.arunkumarsampath.transitionx$prepareTransition(android.view.ViewGroup, kotlin.Boolean, android.support.transition.Transition)/transition">transition</span><span
        class="symbol">:</span>&nbsp;<a
        href="https://developer.android.com/reference/android/support/transition/Transition.html"><span
        class="identifier">Transition</span></a><span class="symbol">)</span><span
        class="symbol">: </span><a
        href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span
        class="identifier">Unit</span></a></code>
<p>Calls <a
        href="https://developer.android.com/reference/android/support/transition/TransitionManager.html#beginDelayedTransition(android.view.ViewGroup)">TransitionManager.beginDelayedTransition</a>
    with this <a href="https://developer.android.com/reference/android/view/ViewGroup.html">ViewGroup</a>
    and
    <a href="prepare-transition.html#in.arunkumarsampath.transitionx$prepareTransition(android.view.ViewGroup, kotlin.Boolean, android.support.transition.Transition)/transition">transition</a>
    as the
    parameter.</p>
<p>Usage:</p>
<pre><code>constraintLayout.prepareTransition(transition)

someView.hide()
</code></pre>
<h3>Parameters</h3>
<p><a name="cancel"></a>
    <code>cancel</code> - if true, ends all previous transitions before starting the transition</p>
<p><a name="transition"></a>
    <code>transition</code> - the transition instance that should be used</p>
</BODY>
</HTML>
